* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1, h2, h3 {
    margin-bottom: 20px;
    color: #2c3e50;
}

h1 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
    padding-bottom: 15px;
}

.upload-section {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.upload-section:hover {
    border-color: #3498db;
}

.upload-btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: #3498db;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.upload-btn:hover {
    background-color: #2980b9;
}

input[type="file"] {
    display: none;
}

.supported-formats {
    margin-top: 10px;
    font-size: 0.8rem;
    color: #777;
}

.font-info {
    margin-top: 15px;
    font-size: 0.9rem;
    color: #666;
}

.viewer-section {
    margin-top: 30px;
}

.panel {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.example-text {
    font-size: 1.2rem;
    line-height: 1.8;
}

.example-text p {
    margin-bottom: 10px;
}

.all-chars {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.char-item {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1.2rem;
    background-color: #fff;
    transition: all 0.2s;
}

.char-item:hover {
    transform: scale(1.2);
    border-color: #3498db;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

textarea {
    width: 100%;
    min-height: 150px;
    padding: 15px;
    font-size: 1.2rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
}

.otf-features {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.feature-toggle {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.feature-toggle label {
    margin-left: 8px;
    cursor: pointer;
}

.feature-name {
    font-weight: bold;
}

.feature-description {
    font-size: 0.85rem;
    color: #666;
    margin-top: 3px;
}

.feature-example {
    margin-top: 10px;
    padding: 8px;
    background-color: #fff;
    border-radius: 4px;
    border: 1px solid #eee;
}

.hidden {
    display: none;
}

.font-info-row {
    display: flex;
    margin-bottom: 5px;
    padding: 8px;
    background-color: #f0f8ff;
    border-radius: 4px;
}

.font-info-label {
    font-weight: bold;
    min-width: 150px;
}

.loading {
    color: #666;
    font-style: italic;
}

.char-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 1000;
    max-width: 400px;
    width: 90%;
}

.char-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.char-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.char-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.char-modal-close:hover {
    color: #333;
}

.char-preview {
    font-size: 72px;
    text-align: center;
    margin: 20px 0;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
}

.char-details {
    display: grid;
    gap: 10px;
}

.char-detail-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    padding: 8px;
    background: #f9f9f9;
    border-radius: 4px;
}

.char-detail-label {
    font-weight: bold;
    color: #666;
}

.variable-axes {
    margin-bottom: 15px;
}

.axis-control {
    margin-bottom: 10px;
}

.axis-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.axis-name {
    font-weight: bold;
}

.axis-value {
    color: #666;
}

.axis-slider {
    width: 100%;
}

.style-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.style-btn {
    padding: 8px 12px;
    background-color: #f1f1f1;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.style-btn:hover {
    background-color: #e1e1e1;
}

.style-btn.active {
    background-color: #3498db;
    color: white;
    border-color: #2980b9;
}

.update-btn {
    padding: 8px 16px;
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    margin-left: auto;
}

.update-btn:hover {
    background-color: #27ae60;
}